#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int h = 0, m = 0, tol = 0;
    scanf("%d:%d %d", &h, &m, &tol);
    h = ((m + tol) / 60 + h) % 24;
    m = (m + tol % 60) % 60;
    printf("%02d:%02d", h, m);
    return 0;
}